import com.formdev.flatlaf.FlatIntelliJLaf;
import gui.LoginForm;
import gui.admin.ManageAdmin;

import javax.swing.*;
import javax.swing.plaf.FontUIResource;
import java.awt.*;
import java.util.Enumeration;

public class TicketManageSystem {
    public static void main(String[] args) {
        FlatIntelliJLaf.setup();
        setGlobalFont(new Font("微软雅黑", Font.PLAIN, 18));
        SwingUtilities.invokeLater(LoginForm::new);
    }

    private static void setGlobalFont(Font font) {
        FontUIResource fontRes = new FontUIResource(font);
        for (@SuppressWarnings("rawtypes")
             Enumeration keys = UIManager.getDefaults().keys(); keys.hasMoreElements();) {
            Object key = keys.nextElement();
            Object value = UIManager.get(key);
            if (value instanceof FontUIResource) {
                UIManager.put(key, fontRes);
            }
        }
    }
}
